<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
    
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <title>
            <?php echo $title ?>-<?php echo C('STIE_NAME') ?>
        </title>
        <link rel="stylesheet" href="/fly/Public/font/font_aw93q7mhbm7k3xr.css">
        <link rel="stylesheet" href="/fly/Public/layui/css/layui.css">
        <link rel="stylesheet" href="/fly/Public/css/global.css">
        <!-- <link rel="stylesheet" data-href="http://res.layui.com/css/fly/stretch.css?t=1490671847521"
        class="fly-style"> -->
         <script src="/fly/Public/layui/layui.js">
        </script>
    </head>
    
    <body>
        <div class="header">
            <div class="main">
                <a class="logo" href="/fly" title="Fly">
                    Fly社区
                </a>
                <div class="nav">
                    <!-- <a href="/jie/">
                        <i class="iconfont icon-wenda">
                        </i>
                        讨论
                    </a>
                    <a href="/case/2017/">
                        <i class="iconfont icon-iconmingxinganli" style="top: 2px;">
                        </i>
                        案例
                    </a> -->
                    <a href="http://www.layui.com/">
                        <i class="iconfont icon-ui">
                        </i>
                        框架
                    </a>
                </div>
            <?php if (isset($_SESSION['id'])) { ?>
               <div class="nav-user">
                    <a class="avatar" href="<?php echo U('home/u/index',array('id'=>$_SESSION['id']));?>">
                        <img src="/fly/<?php echo $_SESSION['face'] ?>">
                        <cite>
                            <?php echo $_SESSION['nickname'] ?>
                        </cite>
                    </a>
                    <div class="nav">
                        <a href="<?php echo U('home/set/index');?>">
                            <i class="iconfont icon-shezhi">
                            </i>
                            设置
                        </a>
                        <a href="<?php echo U('home/login/loginout');?>">
                            <i class="iconfont icon-tuichu" style="top: 0; font-size: 22px;">
                            </i>
                            退了
                        </a>
                    </div>
                </div>
            <?php }else{ ?>
                <div class="nav-user">
                    <a class="unlogin" href="/user/login/">
                        <i class="iconfont icon-touxiang">
                        </i>
                    </a>
                    <span>
                        <a href="<?php echo U('home/login/index');?>">
                            登入
                        </a>
                        <a href="<?php echo U('home/reg/index');?>">
                            注册
                        </a>
                    </span>
                    <p class="out-login">
                        <a href="http://fly.layui.com:8098/app/qq" onclick="layer.msg('正在通过QQ登入', {icon:16, shade: 0.1, time:0})"
                        class="iconfont icon-qq" title="QQ登入">
                        </a>
                        <a href="http://fly.layui.com:8098/app/weibo/" onclick="layer.msg('正在通过微博登入', {icon:16, shade: 0.1, time:0})"
                        class="iconfont icon-weibo" title="微博登入">
                        </a>
                    </p>
                </div>

               <?php } ?>


                

                


            </div>
        </div>
<div class="main layui-clear">
            <div class="wrap">
                <div class="content">
                    <div class="fly-tab fly-tab-index">
                        <span>
                            <a href="<?php echo U('home/index/index');?>" class="tab-this">
                                全部
                            </a>
                            <a href="<?php echo U('home/index/wu');?>">
                                未结帖
                            </a>
                            <a href="<?php echo U('home/index/cao');?>">
                                已采纳
                            </a>
                            <a href="<?php echo U('home/index/jing');?>">
                                精帖
                            </a>
                            <a href="<?php echo U('home/index/my');?>">
                                我的帖
                            </a>
                        </span>
                        <form action="<?php echo U('home/index/so');?>" class="fly-search">
                            <i class="iconfont icon-sousuo">
                            </i>
                            <input class="layui-input" autocomplete="off" placeholder="搜索内容，回车跳转"
                            type="text" name="q">
                        </form>
                        <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
                        <script type="text/javascript">
                            $(function  () {
                                $('.icon-sousuo').click(function() {
                                    $('.fly-search').submit();
                                });
                            })
                        </script>
                        <a href="<?php echo U('home/publish/index');?>" class="layui-btn jie-add">
                            发表新帖
                        </a>
                    </div>
                     <ul class="fly-panel fly-list fly-list-top">
                    <?php foreach ($ars as $v) { ?>
                        <li class="fly-list-li">
                            <a href="<?php echo U('home/u/index',array('id'=>$v['uid']));?>" class="fly-list-avatar">
                                <img src="/fly/<?php echo $v['face'] ?>" alt="纸飞机">
                            </a>
                            <h2 class="fly-tip">
                                <a href="<?php echo U('home/Publish/homepage',array('id'=>$v['id']));?>">
                                    <?php echo htmlspecialchars_decode($v['title']) ?>
                                </a>
                                <?php if ($v['tip']==1) { ?>
                                       <span class="fly-tip-stick">置顶</span>
                                    <?php } if ($v['tip']==2) { ?>
                                        <span class="fly-tip-jing">精帖</span>
                                    <?php }if ($v['tip']==3) { ?>
                                        <span class="fly-tip-stick">置顶</span>
                                        <span class="fly-tip-jing">精帖</span>
                                    <?php } ?>
                            </h2>
                            <p>
                                <span>
                                    <a href="<?php echo U('home/u/index',array('id'=>$v['uid']));?>">
                                        <?php echo $v['nickname'] ?>
                                    </a>
                                </span>
                                <span>
                                    发布时间<?php echo date("Y.m.d",$v['create_time']) ?>
                                </span>
                                <span>
                                    <?php echo $v['cname'] ?>
                                </span>
                                <span class="fly-list-hint">
                                    <i class="iconfont" title="回答">
                                        &#xe60c;
                                    </i>
                                    <?php echo $v['answer_num'] ?>
                                    <i class="iconfont" title="人气">
                                        &#xe60b;
                                    </i>
                                   <?php echo $v['view_num'] ?>
                                </span>
                            </p>
                        </li>
                    
                    <?php } ?>
                    </ul>
                    <ul class="fly-panel fly-list">
                    <?php foreach ($arr1 as $v) { ?>
                       
                        <li class="fly-list-li">
                            <a href="<?php echo U('home/u/index',array('id'=>$v['uid']));?>" class="fly-list-avatar">
                                <img src="/fly/<?php echo $v['face'] ?>"
                                alt="楊zzzzzz">
                            </a>
                            <h2 class="fly-tip">
                                <a href="<?php echo U('home/Publish/homepage',array('id'=>$v['id']));?>">
                                    <?php echo htmlspecialchars_decode($v['title']) ?>
                                </a>
                            </h2>
                            <p>
                                <span>
                                    <a href="<?php echo U('home/u/index',array('id'=>$v['uid']));?>">
                                        <?php echo $v['nickname'] ?>
                                    </a>
                                </span>
                                <span>
                                    发布时间<?php echo date("Y.m.d",$v['create_time']) ?>
                                </span>
                                <span>
                                    <?php echo $v['cname'] ?>
                                </span>
                                <span class="fly-list-hint">
                                    <i class="iconfont" title="回答">
                                        &#xe60c;
                                    </i>
                                    <?php echo $v['answer_num'] ?>
                                    <i class="iconfont" title="人气">
                                        &#xe60b;
                                    </i>
                                    <?php echo $v['view_num'] ?>
                                </span>
                            </p>
                        </li>
                   
                    <?php } ?>
                     </ul>
                     <style type="text/css">
                     .laypage-main{
                        border: 0px solid #000;
                     }
                     .laypage-main div{
                        border: 0px solid #000;
                     }
                       .laypage-main a{
                        border: 1px solid #00A2E8;
                        margin-left: 10px;
                       }
                       .laypage-main span{
                        border: 1px solid #99D9EA;
                        background: #3F48CC;
                        margin-left: 10px;
                        color: #fff;
                       }
                     </style>
                    <div style="text-align: center">
                        <div class="laypage-main">
                            <?php echo $show ?>
                        </div>
                    </div>
                </div>
            </div>
            <div class="edge">
                <div class="fly-panel leifeng-rank">
                    <h3 class="fly-panel-title">
                        近一月回答榜 - TOP 12
                    </h3>
                    <dl>
                    <?php foreach ($rew as $v) { ?>
                       <dd>
                            <a href="<?php echo U('home/u/index',array('id'=>$v['id']));?>">
                                <img src="/fly/<?php echo $v['face'] ?>">
                                <cite>
                                    <?php echo $v['nickname'] ?>
                                </cite>
                                <i>
                                    <?php echo $v['answer_num'] ?>次回答
                                </i>
                            </a>
                        </dd> 
                       <?php } ?>
                            
                    </dl>
                </div>
                <dl class="fly-panel fly-list-one">
            <dt class="fly-panel-title">
                最近热帖
            </dt>
            <?php foreach ($arr as $v) { ?>
            <dd>
                <a href="<?php echo U('home/Publish/homepage',array('id'=>$v['id']));?>">
                   <?php echo $v['title'] ?>
                </a>
                <span>
                    <i class="iconfont">
                        
                    </i>
                    <?php echo $v['view_num'] ?>
                </span>
            </dd>
            <?php } ?>
        </dl>
        <dl class="fly-panel fly-list-one">
            <dt class="fly-panel-title">
                    近期热议
                </dt>
            <?php foreach ($row as $v) { ?>
                
                <dd>
                    <a href="<?php echo U('home/Publish/homepage',array('id'=>$v['id']));?>">
                        <?php echo $v['title'] ?>
                    </a>
                    <span>
                        <i class="iconfont">
                            
                        </i>
                        <?php echo $v['answer_num'] ?>
                    </span>
                </dd>
            <?php } ?>
                
        </dl>
               
               
            </div>
        </div>
         <div class="footer">
            <p>
                <a href="http://fly.layui.com/">
                    Fly社区
                </a>
                2017 &copy;
                <a href="http://www.layui.com/">
                    layui.com
                </a>
            </p>
            <p>
                <a href="http://fly.layui.com/jie/3147.html" target="_blank">
                    产品授权
                </a>
                <a href="http://fly.layui.com/jie/8157.html" target="_blank">
                    获取Fly社区模版
                </a>
                <a href="http://fly.layui.com/jie/2461.html" target="_blank">
                    微信公众号
                </a>
            </p>
        </div>
       
    </body>
</html>